<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ include file="/WEB-INF/views/taglibs.jsp" %>
<html>
<head> <meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<div id="toolbar">
<form id="list" action="getMessageInfo">
<div id="search" class="easyui-panel" title="留言信息查询" data-options="fit:true,collapsible:true,border:0"> 
  <table class="searchTable">
	<tr>
		<td>留言用户名：</td>
		<td><input type="text" id="userName" name="userName"></td>
		<!-- <td>类型：</td>
		<td><input type="combo" id="type" name="type"></td>
		<td>级别：</td>
		<td><input type="combo" class="level" name="level"></td> -->
		<td><button id="queryBtn" type="button" class="button">查询</button></td>
		<td><button id="clearBtn" type="button" class="button">清空</button></td>
	</tr>
   </table>
</div>
</form>
<div class="operate">
	<div class="om-panel-header">留言信息列表</div>
	<div class="icon">
		<ul>
<shiro:hasPermission name="leavmessage:delete">  
    			<li><a href="javascript:removeRow('id');"><span class="menu11"></span>删除</a></li>
</shiro:hasPermission>  
		</ul>
	</div>
</div>
</div>
<table id="grid" data-options="fit:true,border:false"></table>
</body>
<script type="text/javascript">
$(function() {
	$('#grid').datagrid({   
	    url:'getMessageInfo', 
	    pageSize :10,
		pageList : [10, 20, 30, 40, 50, 100, 200, 300, 400, 500, 1000],
		striped : true,
		//rownumbers : true,
		pagination : true,
		toolbar : '#toolbar',
	    columns : [[
	                 {width : '50', field : 'ck',checkbox:true},
	                 {width : '100',title : '留言人姓名',field : 'userName'},
	                 {width : '150',title : '邮箱',field : 'email'},
	                 {width : '200',title : '电话',field : 'phone'},
	                 {width : '100',title : '操作',field : 'id',
	      	                formatter:function(v,r){
	      	                	var html = "";
						    	<shiro:hasPermission name="leavMessage:info">  
						    	html += "<a class='osbut' href='#' onclick='openUrl(\"toGetInfo?id="+r.id+"\",1000,200);'><span class='menu8'></span>详情</a>";
						    	</shiro:hasPermission>   
	      	                	return html ? html :"没有其他权限";
	        	            }
	 				}
	            ]]
	}); 
	
});

</script>
</html>